-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow gRPC calls with larger query responses #3335
Conversation
crates/relayer/src/config.rs
Outdated
@@ -472,6 +473,8 @@ pub struct ChainConfig { | |||
pub max_msg_num: MaxMsgNum, | |||
#[serde(default)] | |||
pub max_tx_size: MaxTxSize, | |||
#[serde(default)] | |||
pub max_grpc_decoding_size: Option<Byte>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's set the default value here so that we avoid the if/else at each use site.
crates/relayer/src/chain/cosmos.rs
Outdated
@@ -120,6 +122,8 @@ pub mod types; | |||
pub mod version; | |||
pub mod wait; | |||
|
|||
pub const DEFAULT_GRPC_MAX_MESSAGE_LENGTH: u64 = n_mib_bytes(32); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this and use a default straight in the config struct to avoid the if/else's below
{ status: GrpcStatus } | ||
|e| { format!("gRPC call failed with status: {0}", e.status) }, | ||
{ status: GrpcStatus, query: String } | ||
|e| { format!("gRPC call `{}` failed with status: {1}", e.query, e.status) }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
* Adds a new undocumented configuration `max_grpc_decoding_size` which can be used to specify a new decoding message size upper limit * Updates the gRPC clients decoding message size limit with `max_decoding_message_size()`. If the the `max_grpc_decoding_size` is not configured, sets the limit to `32 MiB`. * Adds the name of the failed query to the `GrpcStatus` error output message --- * Increase gRPC max decoding message size using default value or configured value * Remove const value for max_grpc_decoding_size and use default instead
* Adds a new undocumented configuration `max_grpc_decoding_size` which can be used to specify a new decoding message size upper limit * Updates the gRPC clients decoding message size limit with `max_decoding_message_size()`. If the the `max_grpc_decoding_size` is not configured, sets the limit to `32 MiB`. * Adds the name of the failed query to the `GrpcStatus` error output message --- * Increase gRPC max decoding message size using default value or configured value * Remove const value for max_grpc_decoding_size and use default instead
Closes: #3334
Description
This PR has the following updates:
max_grpc_decoding_size
which can be used to specify a new decoding message size upper limitmax_decoding_message_size()
. If the themax_grpc_decoding_size
is not configured, sets the limit to32 MiB
.GrpcStatus
error output messagePR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.